﻿@model RealEstateApp.WebUI.Models.TaskModel

<style type="text/css">
    .date-pick
    {
        width: 104px
    }

    .input-append .add-on
    {
        cursor: pointer;
    }

    .time-pick
    {
        width: 60px
    }
</style>


<!--PAGE CONTENT BEGINS-->
@using (Ajax.BeginForm("CreateTask", null, new AjaxOptions { UpdateTargetId="tasks" , InsertionMode=InsertionMode.Replace, OnSuccess="initCalendar"}, new { @class = "form-horizontal" }))
{
    @Html.HiddenFor(model => model.CustomerId)
    @Html.ValidationSummary(true)
    <fieldset>

        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(model => model.Name)
            </div>
            <div class="controls">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name)
            </div>
        </div>

        @*<div class="editor-label">
                        @Html.LabelFor(model => model.SalesFID)
                    </div>
                    <div class="editor-field">
                        @Html.EditorFor(model => model.SalesFID)
                        @Html.ValidationMessageFor(model => model.SalesFID)
                    </div>*@

        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(model => model.Description)
            </div>
            <div class="controls">
                @Html.EditorFor(model => model.Description)
                @Html.ValidationMessageFor(model => model.Description)
            </div>
        </div>

        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(model => model.StartDate)
            </div>
            <div class="controls">
                <div class="input-append">
                    @Html.TextBoxFor(model => model.StartDate, new { @class="date-pick"})
                    <span class="add-on dp-choose-date">
                        <i class="icon-calendar"></i>
                    </span>
                    @Html.ValidationMessageFor(model => model.StartDate)
                </div>
                <div class="input-append bootstrap-timepicker">
					@Html.TextBoxFor(model => model.StartHour, new { @class="time-pick"})
					<span class="add-on dp-choose-time">
						<i class="icon-time"></i>
					</span>
				</div>
            </div>
        </div>

        <div class="control-group">
            <div class="control-label">
                @Html.LabelFor(model => model.EndDate)
            </div>
            <div class="controls">
                <div class="input-append">
                    @Html.TextBoxFor(model => model.EndDate, new { @class="date-pick"})
                    <span class="add-on dp-choose-date">
                        <i class="icon-calendar"></i>
                    </span>
                    @Html.ValidationMessageFor(model => model.EndDate)
                </div>
                <div class="input-append bootstrap-timepicker">
					@Html.TextBoxFor(model => model.EndHour, new { @class="time-pick"})
					<span class="add-on dp-choose-time">
						<i class="icon-time"></i>
					</span>
				</div>
            </div>
        </div>

        <div class="form-actions">
            <button class="btn btn-info" type="submit">
                <i class="icon-ok bigger-110"></i>
                Lưu lại
            </button>
        </div>


    </fieldset>
}